<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: sw::MenuItem类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classsw_1_1_menu_item.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classsw_1_1_menu_item-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">sw::MenuItem类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>菜单项  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_menu_item_8h_source.html">MenuItem.h</a>&gt;</code></p>
<div class="dynheader">
类 sw::MenuItem 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsw_1_1_menu_item.png" usemap="#sw::MenuItem_map" alt=""/>
  <map id="sw::MenuItem_map" name="sw::MenuItem_map">
<area href="classsw_1_1_i_tag.html" title="Tag接口" alt="sw::ITag" shape="rect" coords="0,0,87,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a45cb03eb9423fbe1c187f237ec89377a" id="r_a45cb03eb9423fbe1c187f237ec89377a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a45cb03eb9423fbe1c187f237ec89377a">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>)</td></tr>
<tr class="memdesc:a45cb03eb9423fbe1c187f237ec89377a"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，并设置文本  <br /></td></tr>
<tr class="separator:a45cb03eb9423fbe1c187f237ec89377a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc23694c9e8b0cba6910f360e96e07ac" id="r_afc23694c9e8b0cba6910f360e96e07ac"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afc23694c9e8b0cba6910f360e96e07ac">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> MenuItemCommand &amp;<a class="el" href="#a2a89a577f6cc2eafe9b6d55eb3c9c8ee">command</a>)</td></tr>
<tr class="memdesc:afc23694c9e8b0cba6910f360e96e07ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，并设置其回调函数  <br /></td></tr>
<tr class="separator:afc23694c9e8b0cba6910f360e96e07ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af68934d85fe10b3b01bf4038d66275e4" id="r_af68934d85fe10b3b01bf4038d66275e4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af68934d85fe10b3b01bf4038d66275e4">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>, std::initializer_list&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt; <a class="el" href="#ac8e01802bb6cc6f1336025819050f3c4">subItems</a>)</td></tr>
<tr class="memdesc:af68934d85fe10b3b01bf4038d66275e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，并设置其子项  <br /></td></tr>
<tr class="separator:af68934d85fe10b3b01bf4038d66275e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a202803354be2beb12a1cf1aa5cab00b6" id="r_a202803354be2beb12a1cf1aa5cab00b6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a202803354be2beb12a1cf1aa5cab00b6">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> <a class="el" href="#a71e23c18ace7346f28415ed747d80905">tag</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>)</td></tr>
<tr class="memdesc:a202803354be2beb12a1cf1aa5cab00b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，并设置tag及文本  <br /></td></tr>
<tr class="separator:a202803354be2beb12a1cf1aa5cab00b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5abf91fc5b59265e48a5add77b6030c1" id="r_a5abf91fc5b59265e48a5add77b6030c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5abf91fc5b59265e48a5add77b6030c1">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> <a class="el" href="#a71e23c18ace7346f28415ed747d80905">tag</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> MenuItemCommand &amp;<a class="el" href="#a2a89a577f6cc2eafe9b6d55eb3c9c8ee">command</a>)</td></tr>
<tr class="memdesc:a5abf91fc5b59265e48a5add77b6030c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，并设置tag及回调函数  <br /></td></tr>
<tr class="separator:a5abf91fc5b59265e48a5add77b6030c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a140ecb317179de2ed111974666bae1" id="r_a8a140ecb317179de2ed111974666bae1"><td class="memTemplParams" colspan="2">template&lt;<a class="el" href="classsw_1_1_dictionary.html">typename</a> T &gt; </td></tr>
<tr class="memitem:a8a140ecb317179de2ed111974666bae1"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a8a140ecb317179de2ed111974666bae1">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>, T &amp;<a class="el" href="classsw_1_1_dictionary.html">obj</a>, <a class="el" href="classsw_1_1_dictionary.html">void</a>(T::*<a class="el" href="classsw_1_1_dictionary.html">handler</a>)(<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;))</td></tr>
<tr class="memdesc:a8a140ecb317179de2ed111974666bae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，设置成员函数为回调函数  <br /></td></tr>
<tr class="separator:a8a140ecb317179de2ed111974666bae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89486612b9f4dde7765430494bd9e034" id="r_a89486612b9f4dde7765430494bd9e034"><td class="memTemplParams" colspan="2">template&lt;<a class="el" href="classsw_1_1_dictionary.html">typename</a> T &gt; </td></tr>
<tr class="memitem:a89486612b9f4dde7765430494bd9e034"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a89486612b9f4dde7765430494bd9e034">MenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> <a class="el" href="#a71e23c18ace7346f28415ed747d80905">tag</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="#a0f67fc28cb879876a328495035031979">text</a>, T &amp;<a class="el" href="classsw_1_1_dictionary.html">obj</a>, <a class="el" href="classsw_1_1_dictionary.html">void</a>(T::*<a class="el" href="classsw_1_1_dictionary.html">handler</a>)(<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;))</td></tr>
<tr class="memdesc:a89486612b9f4dde7765430494bd9e034"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个MenuItem，设置成员函数为回调函数  <br /></td></tr>
<tr class="separator:a89486612b9f4dde7765430494bd9e034"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a136e71998ffff40e3d165749ba7f7306" id="r_a136e71998ffff40e3d165749ba7f7306"><td class="memItemLeft" align="right" valign="top"><a id="a136e71998ffff40e3d165749ba7f7306" name="a136e71998ffff40e3d165749ba7f7306"></a>
<a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><b>IsSeparator</b> () <a class="el" href="classsw_1_1_dictionary.html">const</a></td></tr>
<tr class="memdesc:a136e71998ffff40e3d165749ba7f7306"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个值，表示当前菜单项是否为分隔条 <br /></td></tr>
<tr class="separator:a136e71998ffff40e3d165749ba7f7306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b1b34eaed41f83ca8e6072c0db486a0" id="r_a1b1b34eaed41f83ca8e6072c0db486a0"><td class="memItemLeft" align="right" valign="top"><a id="a1b1b34eaed41f83ca8e6072c0db486a0" name="a1b1b34eaed41f83ca8e6072c0db486a0"></a>
<a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><b>CallCommand</b> ()</td></tr>
<tr class="memdesc:a1b1b34eaed41f83ca8e6072c0db486a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">调用command <br /></td></tr>
<tr class="separator:a1b1b34eaed41f83ca8e6072c0db486a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1187cb70902ab261b8302e7c0c561da9" id="r_a1187cb70902ab261b8302e7c0c561da9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1187cb70902ab261b8302e7c0c561da9">GetTag</a> () <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a1187cb70902ab261b8302e7c0c561da9"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取Tag  <br /></td></tr>
<tr class="separator:a1187cb70902ab261b8302e7c0c561da9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0b1236f09532f993324f76c07c7b8c7" id="r_ab0b1236f09532f993324f76c07c7b8c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab0b1236f09532f993324f76c07c7b8c7">SetTag</a> (<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> <a class="el" href="#a71e23c18ace7346f28415ed747d80905">tag</a>) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:ab0b1236f09532f993324f76c07c7b8c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置Tag  <br /></td></tr>
<tr class="separator:ab0b1236f09532f993324f76c07c7b8c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a71e23c18ace7346f28415ed747d80905" id="r_a71e23c18ace7346f28415ed747d80905"><td class="memItemLeft" align="right" valign="top"><a id="a71e23c18ace7346f28415ed747d80905" name="a71e23c18ace7346f28415ed747d80905"></a>
<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>tag</b></td></tr>
<tr class="memdesc:a71e23c18ace7346f28415ed747d80905"><td class="mdescLeft">&#160;</td><td class="mdescRight">储存用户自定义信息 <br /></td></tr>
<tr class="separator:a71e23c18ace7346f28415ed747d80905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f67fc28cb879876a328495035031979" id="r_a0f67fc28cb879876a328495035031979"><td class="memItemLeft" align="right" valign="top"><a id="a0f67fc28cb879876a328495035031979" name="a0f67fc28cb879876a328495035031979"></a>
std::wstring&#160;</td><td class="memItemRight" valign="bottom"><b>text</b></td></tr>
<tr class="memdesc:a0f67fc28cb879876a328495035031979"><td class="mdescLeft">&#160;</td><td class="mdescRight">菜单项的文本，当值为“-”时表示当前项为分隔条 <br /></td></tr>
<tr class="separator:a0f67fc28cb879876a328495035031979"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a89a577f6cc2eafe9b6d55eb3c9c8ee" id="r_a2a89a577f6cc2eafe9b6d55eb3c9c8ee"><td class="memItemLeft" align="right" valign="top"><a id="a2a89a577f6cc2eafe9b6d55eb3c9c8ee" name="a2a89a577f6cc2eafe9b6d55eb3c9c8ee"></a>
MenuItemCommand&#160;</td><td class="memItemRight" valign="bottom"><b>command</b></td></tr>
<tr class="memdesc:a2a89a577f6cc2eafe9b6d55eb3c9c8ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">菜单项被单击时调用的函数 <br /></td></tr>
<tr class="separator:a2a89a577f6cc2eafe9b6d55eb3c9c8ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8e01802bb6cc6f1336025819050f3c4" id="r_ac8e01802bb6cc6f1336025819050f3c4"><td class="memItemLeft" align="right" valign="top"><a id="ac8e01802bb6cc6f1336025819050f3c4" name="ac8e01802bb6cc6f1336025819050f3c4"></a>
std::vector&lt; std::shared_ptr&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>subItems</b> {}</td></tr>
<tr class="memdesc:ac8e01802bb6cc6f1336025819050f3c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">子项 <br /></td></tr>
<tr class="separator:ac8e01802bb6cc6f1336025819050f3c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>菜单项 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a45cb03eb9423fbe1c187f237ec89377a" name="a45cb03eb9423fbe1c187f237ec89377a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45cb03eb9423fbe1c187f237ec89377a">&#9670;&#160;</a></span>MenuItem() <span class="overload">[1/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个MenuItem，并设置文本 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>菜单项的文本 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afc23694c9e8b0cba6910f360e96e07ac" name="afc23694c9e8b0cba6910f360e96e07ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc23694c9e8b0cba6910f360e96e07ac">&#9670;&#160;</a></span>MenuItem() <span class="overload">[2/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> MenuItemCommand &amp;</td>          <td class="paramname"><span class="paramname"><em>command</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个MenuItem，并设置其回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>菜单项的文本 </td></tr>
    <tr><td class="paramname">command</td><td>被单击时调用的函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af68934d85fe10b3b01bf4038d66275e4" name="af68934d85fe10b3b01bf4038d66275e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af68934d85fe10b3b01bf4038d66275e4">&#9670;&#160;</a></span>MenuItem() <span class="overload">[3/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::initializer_list&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt;</td>          <td class="paramname"><span class="paramname"><em>subItems</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个MenuItem，并设置其子项 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>菜单下的文本 </td></tr>
    <tr><td class="paramname">subItems</td><td>子项列表 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a202803354be2beb12a1cf1aa5cab00b6" name="a202803354be2beb12a1cf1aa5cab00b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a202803354be2beb12a1cf1aa5cab00b6">&#9670;&#160;</a></span>MenuItem() <span class="overload">[4/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">uint64_t</a></td>          <td class="paramname"><span class="paramname"><em>tag</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个MenuItem，并设置tag及文本 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>菜单项的文本 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5abf91fc5b59265e48a5add77b6030c1" name="a5abf91fc5b59265e48a5add77b6030c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5abf91fc5b59265e48a5add77b6030c1">&#9670;&#160;</a></span>MenuItem() <span class="overload">[5/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">uint64_t</a></td>          <td class="paramname"><span class="paramname"><em>tag</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> MenuItemCommand &amp;</td>          <td class="paramname"><span class="paramname"><em>command</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造一个MenuItem，并设置tag及回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>菜单项的文本 </td></tr>
    <tr><td class="paramname">command</td><td>被单击时调用的函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8a140ecb317179de2ed111974666bae1" name="a8a140ecb317179de2ed111974666bae1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a140ecb317179de2ed111974666bae1">&#9670;&#160;</a></span>MenuItem() <span class="overload">[6/7]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="classsw_1_1_dictionary.html">typename</a> T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;</td>          <td class="paramname"><span class="paramname"><em>obj</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">void</a>(T::*)(<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;)</td>          <td class="paramname"><span class="paramname"><em>handler</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造一个MenuItem，设置成员函数为回调函数 </p>
<dl class="tparams"><dt>模板参数</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>成员函数所在的类 </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>成员函数所在的对象 </td></tr>
    <tr><td class="paramname">handler</td><td>处理函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a89486612b9f4dde7765430494bd9e034" name="a89486612b9f4dde7765430494bd9e034"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89486612b9f4dde7765430494bd9e034">&#9670;&#160;</a></span>MenuItem() <span class="overload">[7/7]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;<a class="el" href="classsw_1_1_dictionary.html">typename</a> T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sw::MenuItem::MenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">uint64_t</a></td>          <td class="paramname"><span class="paramname"><em>tag</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;</td>          <td class="paramname"><span class="paramname"><em>obj</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">void</a>(T::*)(<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;)</td>          <td class="paramname"><span class="paramname"><em>handler</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造一个MenuItem，设置成员函数为回调函数 </p>
<dl class="tparams"><dt>模板参数</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>成员函数所在的类 </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>成员函数所在的对象 </td></tr>
    <tr><td class="paramname">handler</td><td>处理函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a1187cb70902ab261b8302e7c0c561da9" name="a1187cb70902ab261b8302e7c0c561da9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1187cb70902ab261b8302e7c0c561da9">&#9670;&#160;</a></span>GetTag()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> sw::MenuItem::GetTag </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取Tag </p>

<p>实现了 <a class="el" href="classsw_1_1_i_tag.html#ad50507cafd55b2d9c18cc5c74a0ed946">sw::ITag</a>.</p>

</div>
</div>
<a id="ab0b1236f09532f993324f76c07c7b8c7" name="ab0b1236f09532f993324f76c07c7b8c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0b1236f09532f993324f76c07c7b8c7">&#9670;&#160;</a></span>SetTag()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a> sw::MenuItem::SetTag </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">uint64_t</a></td>          <td class="paramname"><span class="paramname"><em>tag</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置Tag </p>

<p>实现了 <a class="el" href="classsw_1_1_i_tag.html#a814b2084a60df545ba5d47e96f7928d3">sw::ITag</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="_menu_item_8h_source.html">MenuItem.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>sw</b></li><li class="navelem"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
